function goAlongTree(node, fun) {
    let self = this;
    //fun(node)
    if (node && node.length > 0) {
        node.forEach((n) => {
            fun(n);
            if (n.children) {
                goAlongTree(n.children, fun);
            }
        });
    }
}


module.exports = {goAlongTree}